# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=lxqt-globalkeys
pkgver=1.1.0
pkgrel=0
pkgdesc="Daemon used to register global keyboard shortcuts"
url="https://github.com/lxqt/lxqt-globalkeys"
arch="all !armhf" # armhf blocked by liblxqt and kwindowsystem
license="LGPL-2.0-or-later"
makedepends="
	cmake samurai lxqt-build-tools liblxqt-dev
	qt5-qttools-dev kwindowsystem-dev
	"
subpackages="$pkgname-dev"
options="!check" # No testsuite
source="https://github.com/lxqt/lxqt-globalkeys/releases/download/$pkgver/lxqt-globalkeys-$pkgver.tar.xz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
51cda7a4cdac39502f875c51e0f418f751538dd110545b111462aa3d96007ea72c71127cfb0dc49efc47439ce8155ff3aabfb733d9fe2c8ee17929467bccfe44  lxqt-globalkeys-1.1.0.tar.xz
"
